#include "randomtool.h"
#include <stdlib.h>
#include <time.h>

void RandomTool::resetSeed(){
    srand( (unsigned)time( NULL ) );
}

int RandomTool::getRandomInt(){
        return rand();
}

int RandomTool::getRandomIntFrom(int from, int to){
        return from + getRandomInt()%( to - from );
}

bool RandomTool::isRatio(int percent){
        if( getRandomIntFrom(0, 100) < percent )
                return true;
        return false;
}
